#ifndef TYPE_H
#define TYPE_H
//typedef several input argv type
#include <IPC/streamIO.h>
typedef unsigned char*  user_addr;
typedef struct HANDLE  handle;
typedef char* string;

//define all the types used in the kernel here
//used for passing argv in the syscall

template<int N>
  class __types{};

#define __GET_TYPE_SUPPORT(x)  

#define _TypeDefine(N,_type) \
  template<> struct __types<N> {public :typedef _type dtype;enum{_type_support = N};};

#define _Int_GetType(N) \
  typename __types<N>::dtype

#define _GetType(N) \
  typename _Types::__types<N>::dtype
#define _TYPE_STREAM_FROM 0
_TypeDefine(0,_str)
_TypeDefine(1,_fstr)
//_TypeDefine(1,_istr)
//_TypeDefine(2,_strh)
_TypeDefine(2,_vstr)  //No output

#define _TYPE_STREAM_TO      3
#define _TYPE_LIBMEMORY_FROM 3
//TypeID of Stream Part
/*
#define _TYPE0  _str
#define _TYPE1  _istr
#define _TYPE2  _strh
#define _TYPE3  _vstr
#define _TYPE4  _fstr
*/


#endif
